package com.example.creditservice;

import com.example.creditapi.CreditApi;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: vince_zww
 * @date: 2020/7/28 19:32
 * @desceription:
 */
@RestController
public class CreditService implements CreditApi {
    @Override
    public String add(@PathVariable("userId") Long userId,
                      @PathVariable("credit") Long credit) {
        System.out.println("对用户【userId=" + userId + "】增加积分：" + credit);
        return "{'msg': 'success'}";
    }
}
